package com.wrupple.vegetate.domain;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable
public class PersistentFile implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6365001105818798605L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long domain;
	@Persistent(serialized = "true")
	private FileWrapper fileWrapper;
	
	

	public PersistentFile(Long domain) {
		super();
		this.domain = domain;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param fileWrapper the fileWithThumbnail to set
	 */
	public void setFileWithThumbnail(FileWrapper fileWrapper) {
		this.fileWrapper = fileWrapper;
	}

	/**
	 * @return the fileWithThumbnail
	 */
	public FileWrapper getFileWrapper() {
		return fileWrapper;
	}

	public void setDomain(Long domain) {
		this.domain = domain;
	}

	public Long getDomain() {
		return domain;
	}

}
